package iface;

import java.io.Serializable;

/**
 * Object used to indicate a kill request
 * 
 * @author Jeff
 * 
 */
public class Kill implements Serializable, Message {
    private static final long serialVersionUID = 2L;
    private String userToKill;
    private String username;

    /**
     * Constructs a new kill request
     * 
     * @param username
     *            the user performing the kill
     * @param userToKill
     *            the victim
     */
    public Kill(String username, String userToKill) {
        this.username = username;
        this.userToKill = userToKill;
    }

    /**
     * @return the victim's name
     */
    public String getUserToKill() {
        return userToKill;
    }

    /**
     * @return the attacker's name
     */
    public String getUsername() {
        return username;
    }

    /**
     * @return a String representation of a Kill object
     */
    public String toString() {
        return "<" + username + " has killed " + userToKill + ">";
    }
}
